package io.geekidea.springbootplus.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.geekidea.springbootplus.system.entity.SysOrder;
import io.geekidea.springbootplus.system.entity.SysOrderDetails;
import io.geekidea.springbootplus.system.vo.SysOrderDetailsQueryVo;
import io.geekidea.springbootplus.system.vo.SysOrderQueryVo;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

@Repository
public interface SysOrderDetailsMapper extends BaseMapper<SysOrderDetails> {

    //根据id查找订单xiang情
    SysOrderDetailsQueryVo selectOrderDetailsById(Integer id);
    //根据订单id查找订单详情
    List<SysOrderDetailsQueryVo> selectOrderDetailsByOrderId(Long orderId);
    //单个删除订单详情
    Integer deleteOrderDetails(Long id);
    //根据商品名称查找订单详情
    List<SysOrderDetailsQueryVo> selectOrderDetailsByProductName(String productName);
    //根据商品价格查找商品
    List<SysOrderDetailsQueryVo> selectProductNameByProductPrice(BigDecimal productPrice);
}
